import { createApp } from 'vue'
import App from './App.vue'
import axios from 'axios'
import VueAxios from 'vue-axios'
import router from "@/router"
import ElementPlus from 'element-plus'
import 'element-plus/packages/theme-chalk/src/base.scss'
import 'element-plus/lib/theme-chalk/index.css'
import store from "./store"
import VueWechatTitle from "vue-wechat-title"

const app = createApp(App)

router.beforeEach((to, from, next) => {
    /*路由发生改变修改页面的title */
    if(to.meta.title) {
      document.title = to.meta.title
    }
    next();
})

app.use(VueWechatTitle)
app.use(ElementPlus)
app.use(VueAxios, axios)
app.use(router)
app.use(store)
app.mount('#app')
